package cn.tedu.xuecha.server.adapter.assemble;

import cn.tedu.xuecha.server.adapter.protocol.vo.ContentVO;
import cn.tedu.xuecha.server.bo.ContentBO;
import cn.tedu.xuecha.server.protocol.param.ContentParam;
import cn.tedu.xuecha.server.protocol.query.ContentQuery;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class RequestAssemble {

    public ContentBO assembleParame2BO(ContentParam contentParam){
        ContentBO contentBO = new ContentBO();
        BeanUtils.copyProperties(contentParam,contentBO);
        return contentBO;
    }

    public ContentVO assembleDTO2VO(ContentQuery contentQuery){
        ContentVO contentVO = new ContentVO();
        BeanUtils.copyProperties(contentQuery,contentVO);
        return contentVO;
    }

}
